<?php
/**
 * Nweb Framework
 *
 * This script is protected by copyright. It's use, copying, modification
 * and distribution without written consent of the author is prohibited.
 *
 * @category    source
 * @package     pl.nweb.framework.config
 * @subpackage  adapter
 * @author      Krzysztof Kardasz <krzysztof.kardasz@gmail.com>
 * @copyright   Copyright (c) 2011 Krzysztof Kardasz
 * @license     http://www.gnu.org/licenses/lgpl-3.0.txt  GNU Lesser General Public
 * @version     3.0 $Id$
 * @link        http://code.google.com/p/nweb-framework/
 * @link        http://framework.nweb.pl
 */

namespace pl\nweb\framework\config\adapter;

/**
 * Adapter konfiguracji
 * 
 * @category    source
 * @package     pl.nweb.framework.config
 * @subpackage  adapter
 * @author      Krzysztof Kardasz <krzysztof.kardasz@gmail.com>
 * @copyright   Copyright (c) 2011 Krzysztof Kardasz
 * @version     3.0 $Id$
 */
class Php extends \pl\nweb\framework\config\Adapter
{
    /**
     * Odczytanie konfiguracji
     * 
     * @param string $file plik
     * @return null|array
     */
    public static function read ($file)
    {
        if(is_file($file)) {
            $data = include $file;
            if(is_array($data)) {
                return $data;
            }
        }
        return null;
    }
}